home *** CD-ROM | disk | FTP | other *** search
/ L' Effet Pommier 3 / L'Effet Pommier - Volume 03.iso / Graphismes / 3D / POV-Ray 3.0B5a PPC / POV-Ray 3.0B5a / POVSCN.Scenes / POVSCN / LEVEL3 / DESK.POV < prev    next >
Text File  |  1996-01-11  |  7KB  |  326 lines

  1. // Persistence Of Vision raytracer version 3.0 sample file.
  2. // File by Tom Price, modified by Dan Farmer
  3. //
  4. //                         !! NOTE !!
  5. // Designed to be run as a 3-frame animation, which will generate the
  6. // self-including image_maps in the picture frame.  See DESK.INI.
  7. // Specifies .TGA format for the image_maps, so you may need to do
  8. // some editing if your standard output format is different than that.
  9.  
  10. #version 3.0
  11. global_settings { assumed_gamma 2.2 }
  12.  
  13. #include "shapes.inc"
  14. #include "colors.inc"
  15. #include "textures.inc"
  16. #include "woods.inc"
  17. #include "glass.inc"
  18. #include "metals.inc"
  19.  
  20. #declare This_Brass = texture { T_Brass_4B }
  21.  
  22. #declare
  23. RedPencil = union {
  24.    cylinder {0, y*30, 0.5
  25.       finish {
  26.          crand 0.05
  27.          ambient 0.3
  28.          diffuse 0.7
  29.       }
  30.       pigment { Red }
  31.    }
  32.  
  33.    cylinder {0, y*32, 0.5
  34.       finish {
  35.          crand 0.05
  36.          ambient 0.3
  37.          diffuse 0.7
  38.       }
  39.       pigment { Tan }
  40.    }
  41. }
  42.  
  43. #declare GreenPencil =
  44. union {
  45.    cylinder {0, y*30, 0.5
  46.       finish {
  47.          crand 0.05
  48.          ambient 0.3
  49.          diffuse 0.7
  50.       }
  51.       pigment { Green }
  52.    }
  53.  
  54.    cylinder {0, y*32, 0.5
  55.       finish {
  56.          crand 0.05
  57.          ambient 0.3
  58.          diffuse 0.7
  59.       }
  60.       pigment { Tan }
  61.    }
  62. }
  63.  
  64. #declare BluePencil =
  65. union {
  66.    cylinder {0, y*30, 0.5
  67.       finish {
  68.          crand 0.05
  69.          ambient 0.3
  70.          diffuse 0.7
  71.       }
  72.       pigment { Blue }
  73.    }
  74.  
  75.    cylinder {0, y*32, 0.5
  76.       finish {
  77.          crand 0.05
  78.          ambient 0.3
  79.          diffuse 0.7
  80.       }
  81.       pigment { Tan }
  82.    }
  83. }
  84.  
  85. #declare Back_Wall =
  86. plane { z, 200.0
  87.    finish {
  88.       crand 0.05
  89.       ambient 0.3
  90.       diffuse 0.7
  91.    }
  92.    pigment { LightGray }
  93. }
  94.  
  95. #declare Ceiling =
  96. plane { y,  500.0
  97.    finish {
  98.       ambient 0.3
  99.       diffuse 0.7
  100.    }
  101.    pigment { White }
  102. }
  103.  
  104.  
  105. #declare Desk_Top =
  106. box { <-125, -2, -100> <125, 2, 100>
  107.    translate -20.0*y                     // top surface at -18*y
  108.    texture {
  109.       // T_Wood30
  110.       pigment { P_WoodGrain6A color_map { M_Wood6A }}
  111.       #if (clock=4)
  112.           finish { reflection 0.2 }
  113.       #end
  114.       rotate y*90
  115.       translate z*30
  116.       rotate z*5
  117.       scale 5
  118.    }
  119. }
  120.  
  121. #declare Blotter =
  122. union {
  123.    triangle {
  124.       <0.0, 0.0, 0.0>
  125.       <8.5, 0.0, 0.0>
  126.       <0.0, 0.0, -11.0>
  127.    }
  128.    triangle {
  129.       <0.0, 0.0, -11.0>
  130.       <8.5, 0.0, -11.0>
  131.       <8.5, 0.0, 0.0>
  132.    }
  133.  
  134.    scale <4.0, 1.0, 4.0>
  135.    rotate -30.0*y
  136.    translate <-20.0, -17.9999, -40.0>
  137.  
  138.    finish {
  139.       crand 0.04
  140.       ambient 0.15
  141.       diffuse 0.5
  142.    }
  143.    pigment { colour red 0.5 green 0.5 blue 0.3 }
  144. }
  145.  
  146. #declare Paperweight=
  147. intersection {
  148.    sphere { <0.0, -5.0, 0.0>, 10.0 }
  149.    disc { 0, -y, 10.1 }
  150.    translate <0.0, -17.9998, -35.0>
  151.    texture { T_Green_Glass }
  152. }
  153.  
  154.  
  155. /*The Picture itself*/
  156. #declare Picture =
  157. union {
  158.       box { -1, 1
  159.       translate <1.0, 1.0, 1.0>
  160.       scale <20.0, 15.0, 1.0>
  161.  
  162.       finish {
  163.          ambient 0.05
  164.          diffuse 0.9
  165.       }
  166.       pigment {
  167.          #switch(clock)
  168.          #case(4)
  169.              image_map { tga "desk3.tga" once interpolate 2.0 }
  170.              scale <40.0, 30.0, 1.0>
  171.              scale <1.5, 1.5, 1.0>
  172.              #break
  173.          #case(3)
  174.              image_map { tga "desk2.tga" once interpolate 2.0 }
  175.              scale <40.0, 30.0, 1.0>
  176.              scale <1.5, 1.5, 1.0>
  177.              #break
  178.          #case(2)
  179.              image_map { tga "desk1.tga" once interpolate 2.0 }
  180.              scale <40.0, 30.0, 1.0>
  181.              scale <1.5, 1.5, 1.0>
  182.              #break
  183.          #else
  184.              Gray50
  185.          #end
  186.       }
  187.    }
  188.  
  189.    /* The picture frame */
  190.    union {
  191.       cylinder {-y,31*y,1 translate 41*x }
  192.       cylinder {-y,31*y,1 translate -1*x }
  193.       cylinder {-x,41*x,1 translate 31*y }
  194.       cylinder {-x,41*x,1 translate -1*y }
  195.       sphere { <-1.0, -1.0, 0.0>, 1.0 }
  196.       sphere { <-1.0, 31.0, 0.0>, 1.0 }
  197.       sphere { <41.0, -1.0, 0.0>, 1.0 }
  198.       sphere { <41.0, 31.0, 0.0>, 1.0 }
  199.       texture { This_Brass }
  200.    }
  201.  
  202.    scale 1.5
  203.    rotate <10.0, -35.0, 0.0>
  204.    translate <-65.0, -15.0, -25.0>
  205. }
  206.  
  207. #declare Pencil_Holder =
  208. union {
  209.    intersection {
  210.       object { Cylinder_Y scale <5.0, 1.0, 5.0> }
  211.       object { Cylinder_Y scale <4.8, 1.0, 4.8> inverse }
  212.       plane { y, 0.0 inverse }
  213.       plane { y, 15.0 rotate -45*x }
  214.       texture { This_Brass }
  215.    }
  216.    object {
  217.       RedPencil
  218.       rotate -2*z
  219.       translate <1.0, 0.0, 1.0>
  220.    }
  221.    object {
  222.       GreenPencil
  223.       rotate 2.0*z
  224.       translate <-1.0, 3.0, 0.0>
  225.    }
  226.    object {
  227.       BluePencil
  228.       rotate <-2.0, 0.0, 3.0>
  229.       translate <0.0, -2.0, -1.0>
  230.    }
  231.    rotate 45*y
  232.    translate <70.0, -18.0, -20.0>
  233. }
  234.  
  235. #declare Lamp =
  236. union {
  237.    object {
  238.       cylinder { -y*18, y*40, 3 }
  239.       texture { This_Brass }
  240.    }
  241.    cylinder { -y*2, y*2, 25
  242. //    intersection {
  243. //       object { Cylinder_Y scale <25.0, 1.0, 25.0> }
  244. //       plane { y, 2.0 }
  245. //       plane { y, -2.0 inverse }
  246.  
  247.       translate <0.0, -16.0, -5.0>
  248.       texture { This_Brass
  249.          normal { bumps 0.1 }
  250.       }
  251.    }
  252.  
  253.    intersection {
  254.       object { Cylinder_X scale <1.0, 10.0, 10.0> }
  255.       object { Cylinder_X scale <1.0, 9.95, 9.95> inverse }
  256.       plane { y, 0.0 inverse }
  257.       plane { x, -30.0 inverse }
  258.       plane { x, 30.0 }
  259.  
  260.       translate <0.0, 35.0, -13.0>
  261.  
  262.       finish {
  263.          Shiny
  264.          crand 0.05
  265.          ambient 0.5
  266.          diffuse 0.5
  267.          reflection 0.3
  268.          brilliance 4.0
  269.       }
  270.       pigment { DarkGreen }
  271.    }
  272.  
  273.    union {
  274.       intersection {
  275.          sphere { <-30.0, 35.0, -13.0>, 10.0 }
  276.          sphere { <-30.0, 35.0, -13.0>, 9.95 inverse }
  277.          plane { y, 35.0 inverse }
  278.          plane { x, -30.0 }
  279.       }
  280.       intersection {
  281.          plane { y, 35.0 inverse }
  282.          plane { x, 30.0 inverse }
  283.          sphere { <30.0, 35.0, -13.0>, 10.0 }
  284.          sphere { <30.0, 35.0, -13.0>, 9.95 inverse }
  285.       }
  286.       texture { This_Brass }
  287.    }
  288.  
  289.    rotate 35*y
  290.    translate <50.0, 0.0, 30.0>
  291. }
  292.  
  293. /*The fluorescent tube inside the lamp*/
  294. #declare Lamp_Light_Source =
  295. light_source { <0, 0, 0> color White
  296.  
  297.     looks_like {
  298.        cylinder { -x*25, x*25, 2
  299.           pigment { White filter 0 }
  300.           finish { ambient 1 diffuse 0 }
  301.       }
  302.    }
  303.  
  304.    translate <0.0, 43.0, -10.0>
  305.    rotate 35*y
  306.    translate <50.0, 0.0, 30.0>
  307. }
  308. camera {
  309.    location <0.0, 40.0, -150.0>
  310.    up <0.0, 1.0, 0.0>
  311.    right <4/3, 0.0, 0.0>
  312.    look_at <0.0, 0.0, 0.0>
  313. }
  314.  
  315. light_source { <20.0, 100.0, -200.0> colour White }
  316.  
  317. object { Back_Wall }
  318. object { Ceiling }
  319. object { Desk_Top }
  320. object { Blotter }
  321. object { Paperweight }
  322. object { Lamp }
  323. object { Lamp_Light_Source }
  324. object { Picture }
  325. object { Pencil_Holder }
  326.